package com.message.Trsansformations;

import com.message.config.ConfigProperties;
import com.message.domain.MessageSourceDto;
import com.message.sink.DingDingMessageSink;
import com.message.source.MessageSource;
import org.apache.flink.streaming.api.datastream.DataStreamSource;
import org.apache.flink.streaming.api.environment.StreamExecutionEnvironment;

public class WorkMessageNoticeApp {
    public static void main(String[] args) throws Exception {
        StreamExecutionEnvironment env = StreamExecutionEnvironment.getExecutionEnvironment();
        env.setParallelism(1);
        ConfigProperties.loadArgs(args);//加载参数配置
        DataStreamSource<MessageSourceDto> dataSource = env.addSource(MessageSource.getInstance());
        dataSource.addSink(DingDingMessageSink.getInstance());
        env.execute("WorkMessageNoticeApp");
    }
}
